package com.wwl.springcloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wwl
 * @version 1.0
 * @date 2021/8/15 11:02
 * @description:
 */
@RestController
@RefreshScope //开启更新功能(需调用：curl -X POST "http://localhost:3355/actuator/refresh")
public class ConfigClientController {
    @Value("${user}")
    private String configInfo;

    @GetMapping("/configInfo")
    public String getConfigInfo(){
        return configInfo;
    }

}
